package xyz.xtt.equity.entity;

import java.io.Serializable;
import java.util.Objects;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;

import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.AllArgsConstructor;
import lombok.Builder;
import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.NoArgsConstructor;
import lombok.experimental.Accessors;

/**
 * <p>
 * 资产权益兑换表
 * </p>
 *
 * @author author
 * @since 2024-12-27
 */
@NoArgsConstructor
@AllArgsConstructor
@Data
@Builder
@EqualsAndHashCode(callSuper = false)
@Accessors(chain = true)
@TableName("tbl_asset_entitlement_deliver")
@ApiModel(value = "TblAssetEntitlementDeliver对象", description = "资产权益兑换表")
public class TblAssetEntitlementDeliver implements Serializable {

	private static final long serialVersionUID = 1L;

	@ApiModelProperty(value = "主键")
	@TableId(value = "id", type = IdType.AUTO)
	private Long id;

	@ApiModelProperty(value = "关联资产主键")
	private Long assetId;

	@ApiModelProperty(value = "权益主键")
	private Long entitlementId;

	@ApiModelProperty(value = "销兑用户uid")
	private Long appUserId;

	@ApiModelProperty(value = "销兑响应")
	private String responeText;

	@ApiModelProperty(value = "销兑结果0失败1成功")
	private Integer result;

	@ApiModelProperty(value = "创建时间")
	private Long createTime;

	public boolean isDeliver() {
		return Objects.equals(result, 1);
	}

}
